/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
// lfbscr24.hpp - Linear screen driver for 24-bpp operation.
//
// Author: Sripathy Vijayaraghavan
//
// Copyright (c) 1997-2006 Swell Software 
//              All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
// This driver supports the Linux Frame Buffer at 24 bits per pixel
// hardware. It assumes that the Linux kernel has properly configured
// all of the video hardware.
//
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef LFBSCR24_HPP_
#define LFBSCR24_HPP_

#include <linux/fb.h>   // for fb* structs

#include "l24scrn.hpp"

/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
class LFBScreen24 : public L24Screen
{
    public:
        LFBScreen24(const PegRect &Size);
        virtual ~LFBScreen24();

    private:
        void ConfigureController(void);
        PEGUBYTE *GetVideoAddress(void);
        void MemoryToScreen(void);
        void ReleaseVT(void);

      #if defined(PEG_MULT_SOFT_SURFACES)
        PEGUBYTE *mpCompositeBuffer;
      #endif  // PEG_MULT_SOFT_SURFACES

        struct fb_var_screeninfo mVarScreenInfo;
        struct fb_fix_screeninfo mFixScreenInfo;
        char *mpFb;
        PEGUBYTE *mpSurfaceMem;
        int miFbfd;
        int miOrgTTY;
        int miNextTTY;
        int miOrgVT;
        int miNextVT;
};

#endif  // LFBSCR24_HPP_

